#define _CRT_SECURE_NO_WARNINGS

#include "cyclequeue.h"

int main()
{
	CQNode cq;
	PCQNode pcq = &cq;
	
	CQueueInit(pcq);

	int input = 0;
	int i = 1;
	int front, back;
	while (1)
	{
		printf("scanf->");
		scanf("%d", &input);
		switch (input)
		{
		case 1:
			CQueuePush(pcq,i);
			i++;
			break;
		case 2:
			CQueuePop(pcq);
			break;
		case 3:
			 front = CQueueFront(pcq);
			 printf("front::%d\n", front);
			break;
		case 4:
			back = CQueueBack(pcq);
			printf("back::%d\n", back);
			break;
		}
	}

	return 0;
}



